package cn.i7baozh.provider.nacos.controller;

import cn.hutool.core.lang.UUID;
import com.alibaba.csp.sentinel.annotation.SentinelResource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Title:
 * @Description:
 * @author: baoqi.zhang
 * @date: 2022/4/13 14:55
 */
@Slf4j
@RestController
public class PaymentController {

    @Value("${server.port}")
    private String port;

    @SentinelResource("abc")
    @RequestMapping("/nacos/payment/abc")
    public String abc(){
        log.info("nacos abc ");
        return "来源于" + port + " 序列号:" +UUID.randomUUID().toString();
    }
}
